package com.edu.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Author:max
 * @Date: 2024/11/8 17:07
 * @Description:
 */
@Aspect
@Component
public class MyAspect {
    @Pointcut("execution(* com.edu.mapper..*.*(..))")
    public void pt1(){}
    Logger logger= LoggerFactory.getLogger(MyAspect.class);
    @After("pt1()")
    public void after(JoinPoint jt){
        logger.info("方法:"+jt.getSignature().getName()+"开始于:"+new Date());
    }


}
